package cn.itcast.domain;

import java.util.Date;

/**
 * Created by lenovo on 2018/6/8.
 */
public class User {
    private String name;
    private Integer age;
    private Car car;
    public User(){}
    public User(String name,Integer age,Car car){
        this.name=name;
        this.age=age;
        this.car=car;
        System.out.println("User(String name,Integer age)");
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Car getCar() {
        return car;
    }

    public void setCar(Car car) {
        this.car = car;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", car=" + car +
                '}';
    }

    public void init(){
        System.out.println("我是初始化方法");
    }
    public void destory(){
        System.out.println("我是销毁方法");
    }
}
